import * as constants from './constants';

const defaultState = {
	id: "",
	articleTitle: "",
	content: '',
	fengImg: '',
	likenum:'',
	messnum:'',
	upnum:'',
	tags:[],
	writer:'',
	writerId:'',
	date:'',

};

export default ( state = defaultState, action) => {
	switch (action.type) {
		case constants.GET_DETAIL_SHOW:
			return {
				...state,
				id:action.id,
				articleTitle:action.articleTitle,
				content:action.content,
				fengImg: action.fengImg,
				likenum:action.likenum,
				messnum:action.messnum,
				upnum:action.upnum,
				tags:action.tags,
				writer:action.writer,
				writerId:action.writerId,
				date:action.date,
			};
		default :
			return state;
	}
};